home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / LSC213.cpt / FontMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-11-09  |  2.7 KB  |  169 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  FontMgr.h
  4.  *
  5.  *  Copyright (c) 1986, 1987 THINK Technologies, Inc.
  6.  *  These interfaces are based on information copyrighted
  7.  *  by Apple Computer, Inc., 1985, 1986, 1987.
  8.  *
  9.  */
  10.  
  11. #ifndef    _FontMgr_
  12. #define _FontMgr_
  13.     
  14. #ifndef    _MacTypes_
  15. #include "MacTypes.h"
  16. #endif
  17.  
  18. /*  font numbers  */
  19. enum {
  20.     systemFont,
  21.     applFont,
  22.     newYork,
  23.     geneva,
  24.     monaco,
  25.     venice,
  26.     london,
  27.     athens,
  28.     sanFran,
  29.     toronto,
  30.     cairo = 11,
  31.     losAngeles,
  32.     times = 20,
  33.     helvetica,
  34.     courier,
  35.     symbol,
  36.     taliesin
  37. };
  38.                     
  39. #define propFont    0x9000
  40. #define prpFntH            0x9001
  41. #define prpFntW            0x9002
  42. #define prpFntHW        0x9003
  43. #define fixedFont    0xB000
  44. #define fxdFntH            0xB001
  45. #define fxdFntW            0xB002
  46. #define fxdFntHW        0xB003
  47. #define fontWid        0xACB0
  48.  
  49. #define fMgrCtl1    8
  50.  
  51.  
  52. typedef struct FMInput
  53.     {
  54.     int            family ;
  55.     int            size ;
  56.     char        face ;
  57.     char        needBits ;
  58.     int            device ;
  59.     Point        numer ;
  60.     Point        denom ;
  61.     } FMInput ;
  62.  
  63. typedef struct    FMOutput
  64.     {
  65.     int            errNum ;
  66.     Handle        fontHandle ;
  67.     Byte        bold ;
  68.     Byte        italic ;
  69.     Byte         ulOffset ;
  70.     Byte        ulShadow ;
  71.     Byte        ulThick ;
  72.     Byte        shadow ;
  73.     SignedByte    extra ;
  74.     Byte        ascent ;
  75.     Byte        descent ;
  76.     Byte        widMax ;
  77.     SignedByte    leading ;
  78.     Byte        unused ;
  79.     Point        numer ;
  80.     Point        denom ;
  81.     } FMOutput ;
  82. typedef    FMOutput *    FMOutPtr ;
  83.  
  84. typedef    struct    FontRec
  85.     {
  86.     int            fontType ;
  87.     int            firstChar ;
  88.     int            lastChar ;
  89.     int            widMax ;
  90.     int            kernMax ;
  91.     int            nDescent ;
  92.     int            fRectMax ;
  93.     int            chHeight ;
  94.     int            owTLoc    ;
  95.     int            ascent ;
  96.     int            descent ;
  97.     int            leading ;
  98.     int            rowWords ;
  99. /*    int            bitImage[rowWords][chHeight];    */
  100. /*    int            locTable[];            */
  101. /*    int            owTable[];            */
  102.     } FontRec ;
  103.  
  104. typedef struct FMetricRec {
  105.     Fixed        ascent;
  106.     Fixed        descent;
  107.     Fixed        leading;
  108.     Fixed        widMax;
  109.     Handle        wTabHandle;
  110. } FMetricRec;
  111.  
  112. typedef struct FamRec {
  113.     int            ffFlags;
  114.     int            ffFamID;
  115.     int            ffFirstChar;
  116.     int            ffLastChar;
  117.     int            ffAscent;
  118.     int            ffDescent;
  119.     int            ffLeading;
  120.     int            ffWidMax;
  121.     long        ffWTabOff;
  122.     long        ffKernOff;
  123.     long        ffStylOff;
  124.     int            ffProperty[9];
  125.     int            ffIntl[2];
  126.     int            ffVersion;
  127. /*    FontAssoc    ffAssoc;        */
  128. /*    WidTable    ffWidthTab;        */
  129. /*    StyleTable    ffStyTab;        */
  130. /*    KernTable    ffKernTab;        */
  131. } FamRec;
  132.  
  133. typedef struct WidthTable {
  134.     Fixed        tabData[256];
  135.     Handle        tabFont;
  136.     long        sExtra;
  137.     long        style;
  138.     int            fID;
  139.     int            fSize;
  140.     int            face;
  141.     int            device;
  142.     Point        inNumer;
  143.     Point        inDenom;
  144.     int            aFID;
  145.     Handle        fHand;
  146.     Boolean        usedFam;
  147.     Byte        aFace;
  148.     int            vOutput;
  149.     int            hOutput;
  150.     int            vFactor;
  151.     int            hFactor;
  152.     int            aSize;
  153.     int            tabSize;
  154. } WidthTable;
  155.  
  156.  
  157. /*  functions returning non-integral values  */
  158. pascal FMOutPtr SwapFont();
  159. pascal FMOutPtr FMSwapFont();
  160.  
  161. /*  low-memory globals  */
  162. extern int ApFontID : 0x984;
  163. extern char FScaleDisable : 0xA63;
  164. extern char FractEnable : 0xBF4;
  165. extern WidthTable **WidthTabHandle : 0xB2A;
  166. extern FamRec **LastFOND : 0xBC2;
  167.  
  168.  
  169. #endif _FontMgr_